import request from "../../src/utils/request";
//获取组织架构
export function getdepartment(){
    return request({
      url:"/company/department"
    })
  }

  //获取员工列表  获取员工简单列表
  //只有员工的名字和ID
  export function getEmployessSimpleListAPI(){
    return request({
      url:"/sys/user/simple"
    })
  }
  //新增部门
  export function createdDepartmentAPI (data) {
    return request({
      url:'/company/department',
      method:'POST',
      data
    })
  }
//获取部门详情的API
export function getdepartmentAPI(id){
  return request({
    url:`/company/department/${id}`
  })
}

//根据ID修改详情
export function updateDepartmentsAPI(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

//根据ID删除部门
export function delDepartmentAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}